package cn.puge.mertisfront.controller;


import cn.puge.commonutils.R;
import cn.puge.mertisfront.entity.conVo.ContentVo;
import cn.puge.mertisfront.service.PugeContentsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *分类
 * @author LIJW
 * @since 2020-08-30
 */
@RestController
@RequestMapping("/mertisfront/puge-contents")
@CrossOrigin
public class PugeContentsController {

    @Autowired
    private PugeContentsService pugeContentsService;

    /**
     * 查询所有分类
     * @return
     */
    @GetMapping("getAllContent")
    public R getAllContent(){

       List<ContentVo> list =  pugeContentsService.getAllContent();
        return R.ok().data("list",list);
    }


}

